summaryrefslogtreecommitdiff
path: root/src/pages/[locale]/furthsettins/scotsoun/[scotsounId]/index.astro
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-13 20:12:53 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-13 20:12:53 +0100
commitf6d45f7b9374444ae1ab751a213d86827b64eb8f (patch)
tree75ded0ecc1bb3c58086fdbf65dc84e2f476ca9b5 /src/pages/[locale]/furthsettins/scotsoun/[scotsounId]/index.astro
parent3d6bc8137220f483ef87ba0aa059568711d0e287 (diff)
Adds Scotsoun
Diffstat (limited to 'src/pages/[locale]/furthsettins/scotsoun/[scotsounId]/index.astro')
-rw-r--r--src/pages/[locale]/furthsettins/scotsoun/[scotsounId]/index.astro27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/pages/[locale]/furthsettins/scotsoun/[scotsounId]/index.astro b/src/pages/[locale]/furthsettins/scotsoun/[scotsounId]/index.astro
new file mode 100644
index 0000000..5b5dc82
--- /dev/null
+++ b/src/pages/[locale]/furthsettins/scotsoun/[scotsounId]/index.astro
@@ -0,0 +1,27 @@
+---
+import Page from '$layouts/Page.astro';
+import localeStaticPaths from '$lib/localeStaticPaths';
+import tPage from '$i18n/translations/pages/scotsounGallery';
+import translate from '$i18n/translate';
+import type Locale from '$types/Locale';
+import { getScotsoun } from '$data/scotsoun';
+import type ScotsounId from '$types/ScotsounId';
+import Scotsoun from '$components/Scotsoun.astro';
+
+export async function getStaticPaths() {
+ const scotsounIds = Object.keys(getScotsoun) as `${ScotsounId}`[];
+ return scotsounIds.flatMap((n) =>
+ localeStaticPaths.map((p) => ({ ...p, params: { ...p.params, scotsounId: n } }))
+ );
+}
+
+const locale = Astro.params.locale as Locale;
+const scotsounId = Astro.params.scotsounId as ScotsounId;
+const t = translate(locale);
+
+const scotsoun = await getScotsoun[scotsounId]();
+---
+
+<Page locale={locale} title={t(tPage, { key: 'title' })}>
+ <Scotsoun scotsoun={scotsoun} locale={locale} />
+</Page>